package hw1_1;

import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String[] strings = scanner.nextLine().split(" ");
        int[] ids = new int[strings.length];
        for (int i = 0; i < strings.length; i++) {
            ids[i] = Integer.parseInt(strings[i]);
        }
        int id = scanner.nextInt();
        Arrays.sort(ids);

        int left= 0;
        int right = ids.length-1;
        while (left<right-1){
            int mid = left +(right-left)/2;
            if(ids[mid]<id){
                left = mid;
            }else right=mid;
        }
        System.out.println(right+1);
    }

}
